package com.hc.componentstarter.controller;

import com.hc.CustomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("hc")
public class HelloController {

    @Autowired
    private CustomService customService;

    @RequestMapping("sayHello")
    public String sayHello(){
        return customService.getName() + " , 你好!";
    }

    @RequestMapping("goodbye")
    public String sayGoodbye(){
        return "Goodbye";
    }
}
